import instance from "../api/index";

export const GetData = () => {
    return instance.get('/Department/list')
}

//获取供应商列表
export const getSupplierList = () => {
    return instance.get("/Supplier/list");
}

//添加供应商
export const addSupplier = (data) => {
    return instance.post("/Supplier/add_supplier", data);
}

//获取供应商报价列表
export const getSupplierQuoteList = () => {
    return instance.post("/Supplier/quotation");
}

//获取价格模块里的供应商列表
export const getSupplierListByPrice = () => {
    return instance.get("/Supplier/supplier_list");
}

//获取价格模块里的产品列表
export const getProductListByPrice = () => {
    return instance.get("/Supplier/product_list");
}

//添加供应商报价表
export const addSupplierQuote = (data) => {
    return instance.post("/Supplier/add_quotation", data);
}

//获取采购订单列表
export const getPurchaseOrderList = () => {
    return instance.get("/Procure/list");
}

//添加采购订单
export const addPurchaseOrder = (data) => {
    return instance.post("/Procure/add_procure", data);
}

//获取供应商对应的产品
export const getProductListBySupplier = (id) => {
    return instance.get(`/Procure/sup_product?id=${id}`,);
}

//获取采购入库列表
export const getPurchaseInList = () => {
    return instance.get("/Procure/enter");
}

//添加采购入库
export const addPurchaseIn = (data) => {
    return instance.post("/Procure/add_enter", data);
}

// 获取销售订单列表Sale/list  参数无
export const SaleData = () => {
    return instance.get('/Sale/list')
}
